<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
</html>
<script>
	//编写函数rev(char) 实现将字符串char倒置  字符串有没有倒置这个方法？没有
	//数组方法有倒置，把字符串转化数组split(),  倒置reverse(); 数组=》字符串 join();
	//比如rev("spring") 返回"gnirps"
	
	function rev(char){
		//字符串，=》数组
		var arr = char.split('').reverse();
		var str = arr.join('');
		return str;
	};

	console.log(rev('summer'))
</script>
